| PIZZA |
Current compiler version:
0.39d
|
| A substantial companion
to Java |
Frequently Asked Questions (with Answers)
Compiler and compatibility issues
|
Is
the Pizza compiler a preprocessor or a full-blown
compiler? |
Both. The Pizza compiler
generates byte-codes directly, without invoking another compiler. It
can also be used as a preprocessor by setting the source output option
-s.
| How
does the performance of the Pizza compiler compare to that of
javac? How does the generated code
compare? |
The last time we measured (using Solaris 5.5 and Win95 with the
Borland JIT compiler), Pizza was about twice as fast as javac
at compiling large Java programs. For small programs, where compiler
start-up time dominates all other costs, the difference is negligible.
However, if you use the resident compiler in PizzaExpress, small
programs will be compiled much more quickly. Numbers can vary between
different versions of the Pizza compiler and javac.
In terms of the speed of the generated bytecode, Pizza is somewhat
less efficient than Java's output, in particular when javac
compiles with optimization on. How much depends on the kind of
program and the virtual machine it runs on. The slowdown should be
often around zero, but can in extreme cases be around 20%. Any
slowdown can be eliminated by compiling with source output option
-s and recompiling the emitted Java sources with
javac. We are currently working on a bytecode optimizer to
improve the quality of generated code.
| Are sources for the compiler
available? |
Yes. See the Distribution page.
The
Pizza compiler does not seem to automatically compile
auxiliary classes, like javac does. |
That's right. Unlike javac, pc will not compile
auxiliary classes automatically. You must explicitly indicate all of
the source files to be compiled. If there are cyclic dependencies, you
must compile all of the source files together.
Does the Pizza compiler do any code
optimization? |
Not at this time, but we are currently working on a bytecode
optimizer.
| Does
Pizza run with JIT compilers (e.g.
Kaffe)? |
In general, yes, since the Pizza
compiler generates standard JVM code. However Pizza does reveal bugs
in some JIT compilers, which fail to produce code for Pizza classes!
Kaffe, for example, does not like some things that Pizza does although
they do confirm with the Java specs. This problem should be fixed in
one of the future versions of Kaffe.
| Does Pizza support JAR
files? |
The compiler cannot read JAR
files. For the time being, you have to unpack then, or rename them to
a zip file. Of course, it is possible to
compress the classes created by the Pizza compiler into a JAR file.
Page design & maintenance: John Maraist.
Answers by Martin Odersky, Christian Kemper, Enno Runne and John
Maraist.
Java is a trademark of Sun Microsystems.
Comments and bug reports to the Pizza Group, pizza@cis.unisa.edu.au.
All software and documents on the Pizza site are © Copyright
1996, 1997 by the respective authors (as attributed on each; terms for
redistribution are available).